<?php
class RPz_Resource_Module_Moduleplugins 
    extends Zend_Application_Resource_ResourceAbstract
{
    public function init()
    {
        $bootstrap = $this->getBootstrap();
        $bootstrap->bootstrap('frontcontroller');
        $front = $bootstrap->getResource('frontcontroller');
        $pluginLoader = $front->getPlugin('RP_Plugin_Module_RequestedModulePluginLoader');
        $options = $this->getOptions();
        
        foreach ($options as $pluginName) {
            $pluginLoader->registerFrontControllerPlugin(
                strtolower($this->getBootstrap()->getModuleName()), $pluginName);
        } 
    }
}